import { defineStore } from "pinia";
import { getCityAll } from "../../services";

const useCityStore = defineStore("city", {
  state: () => ({
    citiesData: {},
    curretnCity: { cityName: "北京" },
  }),
  actions: {
    async fetchCityData() {
      const res = await getCityAll();
      this.citiesData = res.data;
      console.log(this.citiesData, "res");
    },
  },
});

export default useCityStore;
